package cn.xhjava.crm.workbench.service.impl;

import cn.xhjava.crm.settings.domain.User;
import cn.xhjava.crm.settings.mapper.UserMapper;
import cn.xhjava.crm.workbench.domain.ClueRemark;
import cn.xhjava.crm.workbench.mapper.ClueRemarkMapper;
import cn.xhjava.crm.workbench.service.ClueRemarkService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Author:   XiaHu
 * Date:     2023/7/5
 */
@Service
public class ClueRemarkServiceImpl implements ClueRemarkService {

    @Autowired
    private ClueRemarkMapper clueRemarkMapper;


    @Override
    public List<ClueRemark> selectClueRemarkByClueId(String clueId) throws Exception {
        return clueRemarkMapper.selectClueRemarkForDetailByClueId(clueId);
    }

    @Override
    public int add(ClueRemark remark) throws Exception {
        return clueRemarkMapper.insert(remark);
    }

    @Override
    public int delete(String id) throws Exception {
        return clueRemarkMapper.deleteByPrimaryKey(id);
    }

    @Override
    public int update(ClueRemark remark) throws Exception {
        return clueRemarkMapper.updateByPrimaryKeySelective(remark);
    }
}
